package com.woniuxy.feign.hystrix;

import com.woniuxy.feign.GoodsFeign;
import com.work.framework.pojo.Auction;
import com.work.framework.pojo.GoodsAuctionDTO;
import com.work.framework.pojo.ResultDTO;
import com.work.framework.pojo.User;
import io.swagger.annotations.Api;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;
import java.util.Map;

/**
 * @Author: wanghao
 * @Date: 2019/9/18 15:12
 *
 * goods熔断器
 */
@Component
public class GoodsHystrix implements GoodsFeign {

    /**
     * 查询商品卖家失败
     * @param aid
     * @return
     */
    @Override
    public GoodsAuctionDTO selectGoodsAndAuctionByAid(Integer aid){
        System.out.println("查询商品卖家失败");
        return null;
    }

    /**
     * 查询商品竞拍表的信息失败
     * @param aid
     * @return
     */
    @Override
    public Auction selectAuction(Integer aid) {
        System.out.println("查询商品竞拍表的信息失败!!!!");
        return null;
    }



    /**
     * 查询收藏此商品的人失败
     * @param gid
     * @return
     */
    @Override
    public List<User> selectUsers(Integer gid) {
        return null;
    }

    /**
     * 修改商品状态远程调用失败
     * @param aid
     * @param status
     * @return
     */
    @Override
    public Boolean updateAuctionStatus(Integer aid, Integer status) {
        System.out.println("修改商品状态远程调用失败");
        return false;
    }
}
